package com.lonely.system.domain.dto.user;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;

/**
 * @author: 黄志标
 * @date: 2025/5/27 14:54
 * @description: 用户编辑请求实体
 */
@Data
public class SysUserSubmitDto implements Serializable {

    /**
     * 用户id
     */
    private Long id;

    /**
     * 工厂id
     */
    @NotNull(message = "工厂id为空")
    private Long factoryId;

    /**
     * 产线id
     */
    @NotNull(message = "产线id为空")
    private Long productionLineId;

    /**
     * 用户账号
     */
    @NotBlank(message = "用户账号为空")
    private String userName;

    /**
     * 手机号码
     */
    @NotBlank(message = "手机号码为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;

    /**
     * 密码
     */
    private String password;

    /**
     * 生产工种
     */
    private Integer workType;

    /**
     * 职位标签
     */
    private List<String> positionTags;
}
